package com.yc.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * mybatis plus 配置类
 * EnableTransactionManagement开启事务管理
 * MapperScan扫描mapper接口
 * @author kukaha
 * @version 1.0.0
 * @ClassName MybatisPlusConfig.java
 * @Description TODO
 * @createTime 2021年03月27日 13:39:00
 */
@EnableTransactionManagement
@MapperScan(basePackages = "com.yc.mapper")
@Configuration
public class MybatisPlusConfig {

    /**
     * 分页插件
     * @title
     * @author kukaha
     * @updateTime  13:42
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }

}
